{"_id":"@antjs.org/colony","name":"@antjs.org/colony","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@antjs.org/colony","version":"0.0.1","description":"Deploy Ant apps to ants.page (console.antjs.org)","repository":{"type":"git","url":"git+https://github.com/theMackabu/ant.git"},"bin":{"colony":"dist/bin.js"},"main":"dist/index.js","type":"commonjs","scripts":{"build":"rimraf dist && tsc","cli":"ant src/bin.ts","test":"npm run build && node --test test/*.test.cjs","prepack":"npm run build"},"keywords":["ants.page","console.antjs.org","ant","deploy","edge"],"homepage":"https://console.antjs.org","license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^22.9.0","rimraf":"^5.0.5","typescript":"^6.0.3"},"dependencies":{"rolldown":"^1.1.3","smol-toml":"^1.7.0"},"gitHead":"cead31bfd11aaf1a9cbe95bb85f80953288d53dc","_id":"@antjs.org/colony@0.0.1","bugs":{"url":"https://github.com/theMackabu/ant/issues"},"_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-Jr0XKwzw2cJr3FxOEz9R2i27n3O9Cr/9zSZZWBLqdqsTTv4jiPzQlQlg4qYAUKwRpXfFVJn2dxPms5vc1mkbsg==","shasum":"2f24f91d91afda56c164003d9d830766a66e24f3","tarball":"https://registry.npmjs.org/@antjs.org/colony/-/colony-0.0.1.tgz","fileCount":10,"unpackedSize":34225,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGtMkGbT3JAtzZWOHc0BFRHCT0jIP3xSpTSOP5/rdcz2AiEAr1ctSFMculfpvSqahLwjrJeDUoYY6hImW/N5udr8HJ0="}]},"_npmUser":{"name":"themackabu","email":"theMackabu@gmail.com"},"directories":{},"maintainers":[{"name":"themackabu","email":"theMackabu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/colony_0.0.1_1783798847758_0.11824635808801176"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-11T19:40:47.580Z","0.0.1":"2026-07-11T19:40:47.887Z","modified":"2026-07-11T19:40:48.074Z"},"maintainers":[{"name":"themackabu","email":"theMackabu@gmail.com"}],"description":"Deploy Ant apps to ants.page (console.antjs.org)","homepage":"https://console.antjs.org","keywords":["ants.page","console.antjs.org","ant","deploy","edge"],"repository":{"type":"git","url":"git+https://github.com/theMackabu/ant.git"},"bugs":{"url":"https://github.com/theMackabu/ant/issues"},"license":"MIT","readme":"# Colony\n\nColony is the command-line deployment tool for Ant applications hosted on\n[ants.page](https://ants.page). It bundles an application locally, uploads it\nthrough [console.antjs.org](https://console.antjs.org), and manages the hosted\nproject described by `colony.toml`.\n\nColony can deploy script-only applications or applications with static assets.\nDeployments may also include environment variables, KV and SQL bindings, SQL\nmigrations, placement settings, and observability configuration.\n\n## Quick start\n\nAuthorize the CLI, initialize a project, and deploy it:\n\n```sh\ncolony login\ncolony init my-app\ncolony deploy\n```\n\n`colony init` creates a `colony.toml` in the current directory. By default,\nColony bundles `server.js` and deploys the application to\n`https://my-app.ants.page`.\n\nIf the project has package dependencies but no `node_modules` directory,\n`colony deploy` installs them with Antland before building. The application is\nbundled with Rolldown, then uploaded along with any configured assets and\nmigrations.\n\n## Configuration\n\nA complete `colony.toml` can look like this:\n\n```toml\nname = \"my-app\"\nmain = \"server.js\"\nplacement = \"default\"\n\n[observability]\nenabled = true\n\n[vars]\nGREETING = \"hello\"\n\n[[kv]]\nbinding = \"CACHE\"\nid = \"kv_example\"\n\n[[sql]]\nbinding = \"DB\"\nid = \"sql_example\"\nmigrations_dir = \"schema\"\n\n[assets]\ndirectory = \"./dist\"\nnot_found_handling = \"single-page-application\"\nstart_ant = [\"/api/*\"]\n```\n\nThe main settings are:\n\n| Setting                     | Description                                                                                                  |\n| --------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| `name`                      | Project name and the `<name>.ants.page` hostname. Required.                                                  |\n| `main`                      | Application entrypoint. Defaults to `server.js`.                                                             |\n| `placement`                 | Deployment placement. Defaults to `default`.                                                                 |\n| `observability.enabled`     | Enables observability for the deployment.                                                                    |\n| `vars`                      | String values exposed to the application as environment variables.                                           |\n| `kv`                        | KV resources exposed as `env.<binding>`.                                                                     |\n| `sql`                       | SQL resources exposed as `env.<binding>`.                                                                    |\n| `sql.migrations_dir`        | Directory of `.sql` migrations, applied in filename order.                                                   |\n| `assets.directory`          | Directory of static files to upload. Defaults to `./dist`.                                                   |\n| `assets.not_found_handling` | Set to `single-page-application` for SPA fallback behavior.                                                  |\n| `assets.start_ant`          | Routes requests to the Ant application. Use `true` for all requests or a list of globs such as `[\"/api/*\"]`. |\n\nKV and SQL resources are referenced by stable IDs. An optional `name` can be\nprovided on a binding as resource metadata. The assets binding defaults to\n`ASSETS` and can be changed with `assets.binding`.\n\nFilesystem and subprocess modules (`fs`, `fs/promises`, and `child_process`)\nare not available on ants.page and are rejected while bundling.\n\n## Commands\n\n| Command                | Description                                                                                |\n| ---------------------- | ------------------------------------------------------------------------------------------ |\n| `colony login`         | Authorize the device and save a deployment token.                                          |\n| `colony logout`        | Remove the saved deployment token.                                                         |\n| `colony whoami`        | Show the current account.                                                                  |\n| `colony init [name]`   | Create `colony.toml` in the current directory.                                             |\n| `colony deploy`        | Build and deploy the current project.                                                      |\n| `colony list`          | List projects. Alias: `ls`.                                                                |\n| `colony delete [name]` | Delete a project. Alias: `rm`. If no name is given, Colony uses the current `colony.toml`. |\n\nInteractive login stores credentials in `~/.colony/config.json`. For CI and\nother non-interactive environments, set `COLONY_TOKEN` instead:\n\n```sh\nCOLONY_TOKEN=\"$COLONY_TOKEN\" colony deploy\n```\n","readmeFilename":"README.md","_rev":"1-ceb1601f407e836d969b08a210d4ed26"}