slices.sh
v0.1.32
Published
Something I'm working on.
Readme
Something I'm working on. Stay tuned...
Include an app page
Use npx slices.sh install sign-in --with-app to create a project with the registry’s app frame, demo pages and optional account/organization plugins. Use add sign-in --with-app inside an existing project. The previous --demo spelling remains supported.
In an empty folder, add offers to create a new Next.js project (yes by default) and continues with install, preserving your features and options. --yes accepts this offer. Non-interactive runs without --yes show an install hint; --dry-run never creates a project. Existing projects (including those found in a parent folder) keep the normal add behavior. install in a folder that already has components.json offers add instead.
Choosing what to add
npx slices.sh add # in a terminal: tick components from a filterable list
npx slices.sh add ai # a family: tick among its components
npx slices.sh add all # every component (asks once; --yes skips)
npx slices.sh add chat --help # the item's options, accepted values and defaults
npx slices.sh add chat --pick # one question per option, then prints and runs the commandThe item goes after add: npx slices.sh chat add is an error that prints add chat, add chat --pick and add chat --help.
A name the registry does not hold is an error with suggestions; it is never passed to shadcn. Outside a terminal, a family or partial name is an error that lists the matching components. See docs/registry/cli-add.md.
Updates
Run from npm in a terminal, the CLI checks for a newer release at most once an hour (1.5 s timeout) and, when there is one, runs your command with npx slices.sh@<latest>. CI, pipes, --json and non-npm copies never check; SLICES_NO_UPDATE=1 turns it off.
Terminal output
Human output uses a compact ≋ slices.sh header, teal feature names, status dots,
and tables for features, file protection, dependencies and command results.
Completed stages are green, attention is amber, failures are rose, and active
stages are teal. Status words remain present without color. Narrow tables become
labeled records; wide characters and combining marks count as terminal cells.
--color=auto|truecolor|256|16|nevercontrols color depth.--theme=auto|dark|lightselects contrast-safe colors for the terminal background. Auto usesCOLORFGBGwhen available and defaults to the dark palette otherwise. Use--theme=lightfor a light background that does not report its theme. Theme selection never reduces the detected color depth.--unicode=auto|always|nevercontrols characters independently of color. ASCII uses~~~,*,OK,FAILand->.
Capabilities are detected per output stream. Explicit color flags win over
NO_COLOR, then FORCE_COLOR, then TTY/environment detection. CI, dumb terminals
and redirected output default to plain, append-only logs. Width is read each time
output is rendered. Progress reports real stage transitions without invented
percentages. Child prompts keep inherited input/output; noninteractive package
installation stays quiet on success and prints an error tail plus a saved log on
failure. --verbose includes dependency names and package-manager output.
--json keeps stdout free of headers, ANSI sequences and summaries, including
when colors are forced. Diagnostics use stderr. Presentation changes preserve
existing add/install exit codes and JSON schemas: a partial dependency or
provisioning failure is clearly described in the human summary, but does not
change the established exit-code contract. No command reports an app as tested
or its development server as running merely because installation finished.
resources and eo forward their arguments and interactive output to
Extraorbital; their flags belong to that command, not this presentation layer.
snippets <resource> [platform] [action] prints the setup and usage code for a resource
(npx slices.sh snippets mongo nextjs; snippets actions mongo lists the tasks). It runs
npx extraorbital@latest snippets with the same arguments, in the --cwd folder whose
platform is detected when none is named, and exits as it does: variable names only, no
account needed.
Referrals
--ref <slug> (a name, org/repo or a domain) on any command keeps who sent you in the
CLI's state directory (~/.slices, or SLICES_STATE_DIR); the first one kept stays. Every
later provisioning, after add or a bare provision, passes it to Extraorbital as
--love <slug>, which credits them when your machine is linked to an account.
SLICES_REF=<slug> does the same for one run without keeping it. An Extraorbital too old
for --love provisions without it.
Where resources go
After an add or install that needs a resource, the CLI runs extraorbital provision
(--no-provision skips it). Three flags choose where it lands, passed on as Extraorbital's own:
npx slices.sh add collection-table --ephemeral-resources # deleted after 3 days, no backups
npx slices.sh add collection-table --ephemeral-resources=7d --project test --team qa--ephemeral-resources[=<n>d]is--ephemeral [<n>d](1d to 30d, 3d by default). Without--projectthe resources land in Extraorbital's own Ephemeral project.--project <slug>and--team <slug>are its--projectand--team(EXTRAORBITAL_PROJECT_IDandEXTRAORBITAL_TEAMdo the same).
When an Extraorbital too old for --generate or --love refuses them, the retry keeps these
three: a retry that dropped them would provision permanent resources, or into another project.
Send feedback
npx slices.sh feedback "I want to say that..."
npx slices.sh feedback "Drawing canvas needs an export button" --email [email protected]The first command prompts for your reply email in an interactive terminal. For scripts, pass --email or set SLICES_FEEDBACK_EMAIL; --json returns a machine-readable receipt without prompting. Add --remember-email to explicitly save your email in your private CLI configuration. Future feedback uses it unless overridden. The command sends only your message, reply email and CLI version; no source files, credentials or logs are attached. Do not include secrets in the message.
Feedback is stored in the registry server's MongoDB database. The receipt distinguishes saved feedback from a confirmed team email notification. The server notifies the team through Resend, using your email as Reply-To. A failed or pending notification means the message is saved but email acceptance is not confirmed; repeat the identical command after one minute on the same UTC day to retry without creating another record. The reply email is supplied by the sender and is not verified.
The command uses the selected remote registry. With a local filesystem registry it sends to https://r.slices.sh instead, displaying the destination before sending. Use --registry https://your-registry.example to override. Remote feedback requires HTTPS; HTTP is allowed for localhost development. A private registry's API key (--key or SLICES_TOKEN) applies. Identical messages from the same email on the same UTC day share one receipt. Requests allow 1–10,000 message characters, with five new submissions per email per UTC hour and 100 total per hour.
The public registry needs no credential: npx slices.sh install sign-in --with-app. A private registry takes --key or SLICES_TOKEN; anonymous installations omit the registry Authorization header. --beta is no longer needed and is ignored.
