{"_id":"@anybuild-ai/ab","_rev":"4-cd9a095b436e6f2a046b4d844caaa75e","name":"@anybuild-ai/ab","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@anybuild-ai/ab","version":"0.1.0","keywords":["anybuild","cli","sync","lit","frontend","devops"],"author":{"name":"Anybuild AI"},"license":"MIT","_id":"@anybuild-ai/ab@0.1.0","maintainers":[{"name":"anybuild-dev","email":"mail@onedb.online"}],"bin":{"ab":"dist/cli.js","anybuild":"dist/cli.js"},"dist":{"shasum":"2416ac08cfd201a803a1a5d12440b6387eea36e9","tarball":"https://registry.npmjs.org/@anybuild-ai/ab/-/ab-0.1.0.tgz","fileCount":260,"integrity":"sha512-XcFVSt8TNAwcWnJ6ng9mPGl/nr82ncok4iiebTxedaJiJaBorwP545Otk0nvdZ8IN5jmUw5OZqMzbbWRlwniow==","signatures":[{"sig":"MEQCIDl3dkKulaOAL0NmoefakHEdDPqCW9mP0bmBD3D88Xm0AiAnGu7N31c1Ro20iHY5/xySmOI8arlLaG8Pt/TN+RMLZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":338943},"main":"./dist/cli.js","type":"module","types":"./dist/cli.d.ts","engines":{"node":">=20"},"gitHead":"7b0dfe159c1f3ff2b710aaccedae76290ed65b01","scripts":{"ab":"node dist/cli.js","dev":"node --import tsx src/cli.ts","build":"tsc","prepare":"npm run build","anybuild":"node dist/cli.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"anybuild-dev","email":"mail@onedb.online"},"_npmVersion":"10.9.0","description":"Anybuild CLI — sync frontend/UI artifacts with the Anybuild API","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/ab_0.1.0_1784198123813_0.4647752668112648","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anybuild-ai/ab","version":"0.1.1","keywords":["anybuild","cli","sync","lit","frontend","devops"],"author":{"name":"Anybuild AI"},"license":"MIT","_id":"@anybuild-ai/ab@0.1.1","maintainers":[{"name":"anybuild-dev","email":"mail@onedb.online"}],"bin":{"ab":"dist/cli.js","anybuild":"dist/cli.js"},"dist":{"shasum":"749af747e402d86201c1d9f74ee5367dd59e3df2","tarball":"https://registry.npmjs.org/@anybuild-ai/ab/-/ab-0.1.1.tgz","fileCount":260,"integrity":"sha512-24/I5p0VfNyAOn9xAWfDB4fXOUgxm2kOBe1Qh3jHf7I9NVXRw3Vpm2dzqPdsbxZZtGK6s7PhxQufWpyLF9kO/w==","signatures":[{"sig":"MEUCIHzVCDxBP7bGNQZEGAoKMtr7ZUJPQhk5+H0aYWE7LryuAiEAgs9dYQ1b98qGI/7CdF+arFHhNCJWpXsVOs9JwBtzEl8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":330803},"main":"./dist/cli.js","type":"module","types":"./dist/cli.d.ts","engines":{"node":">=20"},"gitHead":"7b0dfe159c1f3ff2b710aaccedae76290ed65b01","scripts":{"ab":"node dist/cli.js","dev":"node --import tsx src/cli.ts","build":"tsc","prepare":"npm run build","anybuild":"node dist/cli.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"anybuild-dev","email":"mail@onedb.online"},"_npmVersion":"10.9.0","description":"Anybuild CLI — sync frontend/UI artifacts with the Anybuild API","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/ab_0.1.1_1784198910101_0.07643837237655049","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anybuild-ai/ab","version":"0.1.2","keywords":["anybuild","cli","sync","lit","frontend","devops"],"author":{"name":"Anybuild AI"},"license":"MIT","_id":"@anybuild-ai/ab@0.1.2","maintainers":[{"name":"anybuild-dev","email":"mail@onedb.online"}],"bin":{"ab":"dist/cli.js","anybuild":"dist/cli.js"},"dist":{"shasum":"d51244b6620104f63f14827887b1f10c00706071","tarball":"https://registry.npmjs.org/@anybuild-ai/ab/-/ab-0.1.2.tgz","fileCount":264,"integrity":"sha512-3Wzqbv8FNng5oshWjBV9reQyiOEDHQ40NhJEmDQrdNjFrSOL2oCtzKaGo3OYylgdE9BV/5q9JiPC2SAbzry+GQ==","signatures":[{"sig":"MEYCIQD+TzzsOofSiFwGlKvfHk9hKUm3fl5a+Psl7goJp5xgpwIhAKeKtkEGsGeqR3g0EGcGS5dJM69hvBkQfTCN5bVSJ4kg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335227},"main":"./dist/cli.js","type":"module","types":"./dist/cli.d.ts","engines":{"node":">=20"},"gitHead":"a9e748ecc94fd70ae286647991fb5240d7a3976b","scripts":{"ab":"node dist/cli.js","dev":"node --import tsx src/cli.ts","build":"tsc","prepare":"npm run build","anybuild":"node dist/cli.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"anybuild-dev","email":"mail@onedb.online"},"_npmVersion":"10.9.0","description":"Anybuild CLI — sync frontend/UI artifacts with the Anybuild API","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/ab_0.1.2_1784294180244_0.6203662397759124","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anybuild-ai/ab","version":"0.2.0","description":"Anybuild CLI — sync frontend/UI artifacts with the Anybuild API","type":"module","main":"./dist/cli.js","bin":{"anybuild":"dist/cli.js","ab":"dist/cli.js"},"scripts":{"build":"tsc","prepare":"npm run build","prepublishOnly":"npm run build","dev":"node --import tsx src/cli.ts","ab":"node dist/cli.js","anybuild":"node dist/cli.js"},"engines":{"node":">=20"},"keywords":["anybuild","cli","sync","lit","frontend","devops"],"license":"MIT","author":{"name":"Anybuild AI"},"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^22.10.0","tsx":"^4.19.0","typescript":"^5.7.0"},"dependencies":{"fast-json-stable-stringify":"^2.1.0"},"_id":"@anybuild-ai/ab@0.2.0","gitHead":"eb0284585d4e873dffe7cb4eecfbe92e242b4ce9","types":"./dist/cli.d.ts","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-b7JZyEM/pvQpffJQilRR8KFiVFGEcnKYewUiGiOOxd5t8F6cCt38sPdyBxhnuE7i7a5VMSqCg8R4d0ZjvbAzCw==","shasum":"3f0cc504e210e3417b2d78f46b5ec5b2363d4c8d","tarball":"https://registry.npmjs.org/@anybuild-ai/ab/-/ab-0.2.0.tgz","fileCount":272,"unpackedSize":394469,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID59THEfrBgei8fK45Nx/MVF7X91jnwAOjTZcCrux1+nAiEArfX+5V1I6sDacHDiWf4Nm9lQJk7iPHBLYsyKC7sghXs="}]},"_npmUser":{"name":"anybuild-dev","email":"mail@onedb.online"},"directories":{},"maintainers":[{"name":"anybuild-dev","email":"mail@onedb.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ab_0.2.0_1788431391281_0.6515112055669694"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T10:35:23.479Z","modified":"2026-09-03T10:29:51.677Z","0.1.0":"2026-07-16T10:35:23.972Z","0.1.1":"2026-07-16T10:48:30.241Z","0.1.2":"2026-07-17T13:16:20.468Z","0.2.0":"2026-09-03T10:29:51.467Z"},"author":{"name":"Anybuild AI"},"license":"MIT","keywords":["anybuild","cli","sync","lit","frontend","devops"],"description":"Anybuild CLI — sync frontend/UI artifacts with the Anybuild API","maintainers":[{"name":"anybuild-dev","email":"mail@onedb.online"}],"readme":"# @anybuild-ai/ab\n\n> CLI for syncing your Anybuild project files with the cloud.\n\n[![npm version](https://img.shields.io/npm/v/@anybuild-ai/ab.svg)](https://www.npmjs.com/package/@anybuild-ai/ab)\n[![Node.js](https://img.shields.io/node/v/@anybuild-ai/ab)](https://nodejs.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\n## Install\n\n```bash\nnpm install -g @anybuild-ai/ab\n\nanybuild --version\nanybuild help\n```\n\nRequires **Node.js 20+**.\n\nPrefer the **`anybuild`** command. The package also installs **`ab`**, but on many systems that name is already used by [ApacheBench](https://httpd.apache.org/docs/current/programs/ab.html).\n\n## Update\n\n```bash\nnpm install -g @anybuild-ai/ab@latest\nanybuild --version\n```\n\n## Quick start\n\n```bash\nanybuild login https://your-host.example.com\nanybuild clone https://your-host.example.com/my-app\ncd my-app\n\n# edit files, then:\nanybuild status\nanybuild push\n```\n\nSign out when finished (especially on shared machines):\n\n```bash\nanybuild logout https://your-host.example.com\n```\n\n## Workflow\n\n1. **Login** to your Anybuild host (stores a session for that host).\n2. **Clone** an application — creates a `./my-app/` folder by default (git-like). Pass `.` to use the current directory.\n3. **Pull** to download the latest remote changes.\n4. Edit tracked project files locally.\n5. **Status** to see what changed.\n6. **Push** to upload your changes.\n\nOn push conflicts, **pull** again, resolve locally, then **push**.\n\nA normal **pull** only downloads files whose last snapshot (`.ab/file-state.json`) differs from the server. If a local file still looks Modified after that, the disk copy does not match the stamped checksum. Restore that file without re-downloading the whole project:\n\n```bash\nanybuild pull --force be/views/transport_events.json\n```\n\nIf a push includes **deletions**, the CLI lists them and asks for confirmation. Pass `--yes` (or `-y`) to skip the prompt (required in non-interactive / CI use).\n\n## Working trees\n\n`status` / `push` track these folders:\n\n| Path | What you edit |\n| --- | --- |\n| `ui/lit/components/` | Custom Lit widgets (`.js`) and theme JSON |\n| `ui/navigation/` | Navigation instance JSON |\n| `ui/portals/` | Portal (`ui_application`) JSON |\n| `be/plv8/` | PLV8 functions (`.js`) |\n| `be/node/` | Node modules (`.js`) |\n| `be/entities/` | Entity authoring JSON |\n| `be/views/` | Custom view authoring JSON |\n\n`meta/` is **read-only** (catalogs, generated schema dumps, default entity widgets, AI rule files). Do not put source entity/view JSON there.\n\n**Entities, views, navigation, and portals**\n\n- Files are simple JSON (`id` = thing UUID; `entity_id` / `view_id` / `navigation_id` / `application_id` stay inside the file as labels). View **sources** use target `id` (thing UUID), not `entity_id` / `view_id`, so they can point at objects in other applications. Format: `AGENTS.md` plus `meta/be/entities/RULES.md`, `meta/be/views/RULES.md`, `meta/ui/navigation/RULES.md`, and `meta/ui/portals/RULES.md` after clone/pull.\n- New views are always **code mode** (SQL + named sources).\n- Custom **designer** views export as the same JSON. Editing one and pushing **converts it to code** on the server. Untouched designer views stay designer.\n- Default entity/component views are **not** under `be/views/` (they stay in `meta/`).\n- Default entity widgets (autogenerated list/create/edit) are **not** under `ui/lit/components/` (they stay in `meta/ui/lit/components/`). After pull, delete leftover copies from `ui/lit/components/` if they still appear as Added.\n- If two records share the same `entity_id` / `view_id` / `navigation_id` / `application_id`, files are `slug.json` and `slug.<thing_id>.json`. Push does **not** rename the live id from the filename.\n- Schema apply is one POST: save, then build in dependency order (entities before views, source views before dependents). In a mixed push the order is widgets, then navigation, then portals, then schema.\n- After a schema, navigation, or portal push, run **`anybuild pull`**. Catalogs under `meta/be/catalog/` refresh only on pull.\n\nChecksums: `.json` under `ui/lit`, `ui/navigation`, `ui/portals`, `be/entities`, and `be/views` uses canonical JSON; other files use raw UTF-8.\n\n## Commands\n\n| Command | Description |\n| --- | --- |\n| `anybuild login <host-url>` | Sign in (prompts for username and password) |\n| `anybuild logout <host-url>` | Sign out and remove the local session for that host |\n| `anybuild clone <host-url>/<app> [directory]` | Download an application into `./<app>/` (or `[directory]`; use `.` for cwd). Options: `--force`, `--debug` |\n| `anybuild pull [paths…]` | Download latest changes. Options: `--force` (overwrite local files even when the last snapshot already matches the server; with no paths this re-downloads everything), `--debug` |\n| `anybuild status` | List local added / modified / deleted files |\n| `anybuild validate [paths…]` | Check pending changes against the server without applying them (checksums, JSON shape, JS parse, schema expand). Does not compile entities or views. Options: `--debug` |\n| `anybuild push [paths…]` | Upload local changes (optional file paths). Options: `--debug`, `--yes` / `-y` (skip confirm when the push includes deletions) |\n\nAlso: `anybuild help`, `anybuild -v` / `--version`.\n\n### Clone examples\n\n```bash\nanybuild clone https://your-host.example.com/my-app\n# → ./my-app/\n\nanybuild clone https://your-host.example.com/my-app .\n# → current directory\n\nanybuild clone https://your-host.example.com/my-app ./other-folder --force\n```\n\n## Configuration\n\n| Location | Purpose |\n| --- | --- |\n| `~/.ab/config.json` | Your login sessions (credentials for each host) |\n| `.ab/` in the project | Project settings and sync state (no passwords) |\n\nRun project commands (`pull`, `push`, `status`, `validate`) from inside a cloned application directory.\n\n## Security\n\n- Sessions live in `~/.ab/` with restrictive file permissions on Unix. Do not share or commit that folder.\n- On shared machines, run `anybuild logout <host-url>` when done.\n- Avoid `--debug` in shared or CI logs.\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}