https://github.com/zackiles/deno-kit-starter-template
A modern, AI-Native, Deno 2 library starter kit with with CLI, HTTP, and WebSocket interfaces for easy testing of your library.
https://github.com/zackiles/deno-kit-starter-template
deno jsr server starter-kit starter-template typescript websocket
Last synced: about 1 month ago
JSON representation
A modern, AI-Native, Deno 2 library starter kit with with CLI, HTTP, and WebSocket interfaces for easy testing of your library.
- Host: GitHub
- URL: https://github.com/zackiles/deno-kit-starter-template
- Owner: zackiles
- License: mit
- Created: 2025-03-01T05:39:00.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-11T05:49:27.000Z (about 2 months ago)
- Last Synced: 2025-03-16T15:57:25.114Z (about 1 month ago)
- Topics: deno, jsr, server, starter-kit, starter-template, typescript, websocket
- Language: TypeScript
- Homepage: https://jsr.io/@zackiles/deno-kit
- Size: 159 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno-Kit
[](https://jsr.io/@zackiles/deno-kit)
[](https://jsr.io/@zackiles/deno-kit)
[](https://jsr.io/@zackiles)A modern, AI-Native, Deno 2 library starter kit with with CLI, HTTP, and WebSocket interfaces for easy testing of your library. You'll never need another starter template again. Setup your project with the best and latest standards and publish in minutes. Maintain and enhance your project long-term with the `deno-kit` CLI (optional).
## Features
🚀 **Guided Setup:** Quickly setup your next package with guided setup and intelligent defaults.
🦖 **Modern Deno 2 Features:** Using the latest Deno 2 APIs and practices such as OpenTelemetry.
🤖 **AI-Native:** Includes a complete set of Deno-optimized AI triggers and meta prompts in `.cursor/rules`, MCP servers for your codebase in `ai/mcp` and a local index of documentation for AI in `docs/ai` to jump-start your project.
🔒 **Safe Defaults:** Achieve a 100% [JSR score](https://jsr.io/docs/scoring) with safe defaults and comprehensive TypeScript coverage.
🛠 **Helpful Testing Tools:**
Accelerate development of library easily with an autogenerated CLI, HTTP Server, and WebSocket interface to consume and test the library locally.- 🔹 **CLI:** Automatically generates stdio command handlers for each function your library exposes.
- 🌐 **HTTP Server:** Automatically generates HTTP endpoints for each function your library exposes.
- ⚡ **WebSocket Server:** Automatically generates JSON-RPC handlers for each function your library exposes.## Quick Start (Setup This Template Repo)
1. Create a new repository from this template (or just clone it you don't have the gh CLI):
```bash
# Using GitHub CLI
gh repo create your-project-name --template zackiles/deno-kit# Or use the GitHub web interface
# Visit https://github.com/zackiles/deno-kit
# Click the "Use this template" button > "Create a new repository"
```2. Clone your new repository:
```bash
git clone https://github.com/your-username/your-project-name.git
cd your-project-name
```3. Run the template generator in the repo. Deno-kit will walk you through configuring your library using the templates in `.deno-kit/templates/`:
```bash
deno install && deno task kit setup
```> ⚠️ **Warning: BEFORE YOU RUN SETUP**\
> Running the template generator will replace this README.md. If you need to access it after, you can find it in `.deno-kit/templates/README.md.backup` or on [github.com/zackiles/deno-kit](https://github.com/zackiles/deno-kit/blob/main/README.md).🎉 **That's it!** You'll have a complete working directory and library and package. You can continue to use `deno-kit` or you can remove it completely from your project using `deno task kit remove`.
**Note on Removing**: Removing `deno-kit` wont harm your project, but it WILL remove your ability to use several helpful long-term features such as : automatic publishing github workflows with `deno task kit publish`, hosting your library automatically with `deno task kit cli` and `deno task kit server`, as well as the ability to adopt the latest features and best practices by updating with `deno task kit update`.
### Updating Deno Kit
Running `deno task kit update` will update the following:
- Cursor rules in `.cursor/`
- MCP servers for AI in `ai/mcp`
- Docs for AI in `ai/docs` (needed for some Cursor rules)
- Docs for humans in `docs/`
- Updates dependencies of `deno-kit`
- General enhancements and critical fixes to `deno-kit`and no longer need to use `deno-kit`, if you want, you can even remove the `.deno-kit` folder. Now explore the rest of the tasks in `deno.jsonc` and being development! Once you're ready to publish your library run `deno publish`.
### Setup Template Strings
A freshly cloned repo will have these template strings found throughout the code base. All of them are optional. Running `deno task kit setup` will replace them. They are:
```text
{PACKAGE_NAME}: Required. e.g "@scope/package-name". Determines {PACKAGE_SCOPE}: Automatically determined from {PACKAGE_NAME}
{PACKAGE_VERSION}: Defaults to 0.0.1
{PACKAGE_DESCRIPTION} Defaults to ""
{PACKAGE_GITHUB_USER}: Defaults to PACKAGE_SCOPE
{PACKAGE_AUTHOR_NAME}: Defaults to "git config user.name"
{PACKAGE_AUTHOR_EMAIL}: Defaults to "git config user.email"
```### Prerequisites
- [Deno](https://deno.com/) v2.0 or newer
- **Note:** if you're building a browser-based library you will have to add additional libraries to `compilerOptions.lib` in `deno.jsonc` such as `dom` after you've generated to template. For more info see: [DenoDocs - CompilerOptions](https://docs.deno.com/runtime/reference/ts_config_migration/)## License
MIT