Skip to content

Commit ec3dff5

Browse files
committed
better readme : )
1 parent cc9d544 commit ec3dff5

1 file changed

Lines changed: 34 additions & 45 deletions

File tree

README.md

Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,53 @@
11
# spin
22

3-
Scaffolder that doesn't care what language or framework you use. Point it
4-
at a template directory with a `spin.toml` and a `_base/` tree, it asks
5-
the template's questions, renders the files, runs the hooks. Done.
3+
A project scaffolding CLI for any language, framework, or stack, enabling developers to bootstrap fully configured projects from reusable templates sourced from GitHub, local directories, or template registries.
64

7-
```sh
8-
spin new myapp https://github.com/spin-templates/charm-tui.git
5+
```bash
6+
spin new myapp https://github.com/user/spin-template.git
97
```
108

11-
![spin logo](https://spincli.pages.dev/SpinLogo.png)
12-
139
## Install
1410

15-
```sh
11+
```bash
1612
go install github.com/N1xev/spin@latest
17-
18-
# or
19-
2013
curl -sSfL https://spincli.pages.dev/install.sh | sh
2114
```
2215

23-
Needs `git` on `$PATH`. Single static binary, nothing else.
24-
25-
## Use
26-
27-
```sh
28-
spin new myapp ./templates/go-cli # local path
29-
spin new myapp https://github.com/me/repo.git # git URL
30-
spin new myapp go-cli-template # pinned name
31-
spin new myapp official/go-cli # registry shorthand
32-
33-
spin add https://github.com/me/repo.git # pin for offline
34-
spin list # show pins
35-
spin update go-cli-template # refresh cache
36-
spin remove go-cli-template # unpin
37-
spin search tui # search registries
38-
spin registry add official https://... # register a registry
39-
spin init my-tpl # create a template
40-
```
41-
42-
Non-interactive:
43-
44-
```sh
45-
spin new myapp go-cli --param port=8080 --param name=myapp
46-
spin new myapp go-cli --print-params # show params, no write
47-
spin new myapp go-cli --dry-run # show files, no write
48-
spin new myapp go-cli --no-hooks # skip hooks
16+
Single static binary. Needs git on $PATH.
17+
18+
## Commands
19+
20+
| Command | Description |
21+
| -------------------------------- | -------------------------------------- |
22+
| `spin new [name] [template]` | Scaffold a project from a template |
23+
| `spin add [spec]` | Pin a template locally for offline use |
24+
| `spin list` | Show pinned templates |
25+
| `spin update [name]` | Refresh a pin's cache |
26+
| `spin remove [name]` | Remove a pin (--purge deletes cache) |
27+
| `spin search [query]` | Search registered registries |
28+
| `spin registry add [name] [url]` | Register a registry |
29+
| `spin registry list` | Show registries |
30+
| `spin init [name]` | Scaffold a new template directory |
31+
32+
## Template Specs
33+
34+
```txt
35+
./templates/go-cli local path
36+
https://github.com/me/repo.git git URL
37+
go-cli-template pinned name
38+
official/go-cli registry shorthand
4939
```
5040

51-
## Template
41+
## Template Anatomy
5242

53-
```
43+
```txt
5444
my-template/
55-
spin.toml # params, hooks, include rules
56-
_base/ # file tree → project
45+
spin.toml params, hooks, include/exclude rules
46+
_base/ directory tree rendered into the project
47+
_pre/ scripts run before rendering
48+
_post/ scripts run after rendering
5749
```
5850

59-
`spin init my-template` writes a starter. Full docs: https://spincli.pages.dev
60-
6151
## License
6252

63-
[Apache 2.0](./LICENSE)
64-
53+
Spin is licensed under [Apache 2.0](./LICENSE)

0 commit comments

Comments
 (0)