{"id":41704038,"url":"https://github.com/nitrosh/nitro-cli","last_synced_at":"2026-05-17T04:06:44.506Z","repository":{"id":334441600,"uuid":"1095089685","full_name":"nitrosh/nitro-cli","owner":"nitrosh","description":"Build static sites with Python code instead of template engines. Live reload, incremental builds, deploy anywhere.","archived":false,"fork":false,"pushed_at":"2026-04-19T18:05:48.000Z","size":419,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T20:03:21.621Z","etag":null,"topics":["build-tool","cli","deploy","html","incremental-build","jamstack","live-reload","nitro","python","python3","ssg","static-site-generator"],"latest_commit_sha":null,"homepage":"https://nitro.sh/cli","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitrosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-12T15:21:08.000Z","updated_at":"2026-04-19T18:03:36.000Z","dependencies_parsed_at":"2026-04-19T20:01:05.377Z","dependency_job_id":null,"html_url":"https://github.com/nitrosh/nitro-cli","commit_stats":null,"previous_names":["nitrosh/nitro-cli"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/nitrosh/nitro-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrosh%2Fnitro-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrosh%2Fnitro-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrosh%2Fnitro-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrosh%2Fnitro-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitrosh","download_url":"https://codeload.github.com/nitrosh/nitro-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrosh%2Fnitro-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33127017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","cli","deploy","html","incremental-build","jamstack","live-reload","nitro","python","python3","ssg","static-site-generator"],"created_at":"2026-01-24T21:18:33.757Z","updated_at":"2026-05-17T04:06:44.477Z","avatar_url":"https://github.com/nitrosh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nitro CLI\n\nA static site generator that lets you build websites using Python and [nitro-ui](https://github.com/nitrosh/nitro-ui).\n\n[![PyPI](https://img.shields.io/pypi/v/nitro-cli?color=green)](https://pypi.org/project/nitro-cli/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nitro-cli)](https://pypi.org/project/nitro-cli/)\n[![PyPI - License](https://img.shields.io/pypi/l/nitro-cli)](https://pypi.org/project/nitro-cli/)\n[![image](https://img.shields.io/github/actions/workflow/status/nitrosh/nitro-cli/test.yml?branch=main)](https://github.com/nitrosh/nitro-cli/actions?query=branch%3Amain)\n\n## Installation\n\n```bash\npip install nitro-cli\n```\n\n### AI Assistant Integration\n\nAdd Nitro CLI knowledge to your AI coding assistant:\n\n```bash\nnpx skills add nitro-sh/nitro-cli\n```\n\nThis enables AI assistants like Claude Code to understand Nitro CLI and generate correct nitro-ui code.\n\n## Quick Start\n\n```bash\nnitro new my-site\ncd my-site\nnitro dev\n```\n\nVisit \u003chttp://localhost:3000\u003e. Build for production with `nitro build`.\n\n## Writing Pages\n\nPages are Python files in `src/pages/` that export a `render()` function:\n\n```python\n# src/pages/index.py\nfrom nitro_ui import HTML, Head, Body, Title, Meta, H1\nfrom nitro import Page\n\ndef render():\n    return Page(\n        title=\"Home\",\n        content=HTML(\n            Head(\n                Meta(charset=\"UTF-8\"),\n                Meta(name=\"viewport\", content=\"width=device-width, initial-scale=1.0\"),\n                Title(\"Home\"),\n            ),\n            Body(H1(\"Welcome!\"))\n        )\n    )\n```\n\nOutput paths mirror the file structure: `src/pages/about.py` → `build/about.html`\n\n## Features\n\n- **Python-Powered** - Write pages in Python with nitro-ui instead of template languages\n- **Live Reload** - Development server with automatic browser refresh\n- **Incremental Builds** - Only rebuild changed pages\n- **Dynamic Routes** - Generate pages from data with `[slug].py` pattern\n- **Draft Pages** - Mark pages as drafts to exclude from production builds\n- **Environment Variables** - Auto-load `.env` files with `from nitro import env`\n- **Image Optimization** - Responsive images with WebP/AVIF conversion\n- **Islands Architecture** - Partial hydration for interactive components\n- **Plugin System** - Extend the build lifecycle with nitro-dispatch hooks\n- **One-Click Deploy** - Netlify, Vercel, or Cloudflare Pages\n\n## Dynamic Routes\n\nGenerate multiple pages from data using `[param].py` naming:\n\n```python\n# src/pages/blog/[slug].py\nfrom nitro import Page\nfrom nitro_datastore import NitroDataStore\n\ndef get_paths():\n    data = NitroDataStore.from_file(\"src/data/posts.json\")\n    return [{\"slug\": p.slug, \"title\": p.title} for p in data.posts]\n\ndef render(slug, title):\n    return Page(title=title, content=...)\n```\n\n## Commands\n\n| Command            | Description                        |\n|--------------------|------------------------------------|\n| `nitro new \u003cname\u003e` | Create new project                 |\n| `nitro init`       | Initialize Nitro in current dir    |\n| `nitro dev`        | Start dev server with live reload  |\n| `nitro build`      | Build for production               |\n| `nitro preview`    | Preview production build           |\n| `nitro routes`     | List all routes                    |\n| `nitro check`      | Validate site without building     |\n| `nitro export`     | Export site as zip archive         |\n| `nitro clean`      | Remove build artifacts             |\n| `nitro deploy`     | Deploy to hosting platform         |\n| `nitro info`       | Show project and environment info  |\n\nRun `nitro \u003ccommand\u003e --help` for options.\n\n## Configuration\n\n```python\n# nitro.config.py\nfrom nitro import Config\n\nconfig = Config(\n    site_name=\"My Site\",\n    base_url=\"https://mysite.com\",\n    renderer={\"minify_html\": True},\n    plugins=[],\n)\n```\n\n## Ecosystem\n\n- **[nitro-ui](https://github.com/nitrosh/nitro-ui)** - Build HTML with Python, not strings\n- **[nitro-datastore](https://github.com/nitrosh/nitro-datastore)** - Schema-free JSON data store with dot notation access\n- **[nitro-dispatch](https://github.com/nitrosh/nitro-dispatch)** - Framework-agnostic plugin system\n- **[nitro-image](https://github.com/nitrosh/nitro-image)** - Fast, friendly image processing for the web\n- **[nitro-validate](https://github.com/nitrosh/nitro-validate)** - Dependency-free data validation\n\n## License\n\nThis project is licensed under the BSD 3-Clause License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrosh%2Fnitro-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitrosh%2Fnitro-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrosh%2Fnitro-cli/lists"}