smartfront
v0.2.2
Published
Smartfront setup and diagnostics CLI
Readme
smartfront CLI
Non-destructive Smartfront setup assistance. This package has no old SDK compatibility exports; install @smartfront/react, @smartfront/vue or @smartfront/angular for SDK integration.
React, Vue and Angular starters include a styled floating Ask Smartfront
launcher and the complete SmartChatPanel: conversation history, starter prompts,
send/stop controls, operation results, parameter forms and confirmations. The
widget fits smaller screens, supports light/dark themes and keeps the draft and
conversation when closed. Escape closes it and returns focus to the launcher.
Customize src/smartfront/smartfront.ui.ts for the title, launcher text and theme,
or edit smartfront.css for appearance and positioning. The generated framework
component is yours to change. Use SmartChat or the headless chat hooks when
building a fully custom UI instead.
npx smartfront init # detect framework/manager, preview files/install command, ask before applying
npx smartfront init --dry-run # preview without writing or installing
npx smartfront init --yes --integrate # authorize scaffolding/install and recognized React bootstrap
npx smartfront init --yes --skip-install # scaffold without dependency installation
npx smartfront init --package-manager npm # choose a manager explicitly
npx smartfront doctor # check framework/adapter dependency presenceRun inside an application's directory containing package.json. Init creates src/smartfront/smartfront.config.ts, modules/example.smartfront.ts, a framework-native chat integration component and smartfront.setup.md. Existing generated paths are never overwritten. It installs missing core/adapter packages using npm, pnpm, yarn or bun according to the manifest/lockfiles, after approval. --package-manager npm|pnpm|yarn|bun overrides detection, including a declared packageManager field. When several lockfiles exist, detection checks pnpm, yarn and bun before defaulting to npm; choose explicitly if a retained lockfile does not match your current workflow.
Before asking to apply a plan that needs dependencies, init checks that the chosen manager runs. If it is unavailable, init explains how to select another manager or use --skip-install; it does not write files or switch managers automatically. --dry-run and --skip-install work without the detected manager being installed.
--integrate updates only a recognized React src/main.tsx, showing its result first; Vue, Angular and other entry shapes receive manual instructions. Existing stores/services are not modified and functions are not discovered automatically. Doctor checks dependency presence; deeper Provider/endpoint/authentication validation is not implemented. Public npx/install requires these packages to be published; this repository's verification installs local tarballs.
Workspace build/test: npm run build -w smartfront, npm run test -w smartfront.
