Skip to content

Commit

Permalink
Merge pull request #149 from kinode-dao/hf/kit-add-reset-cache
Browse files Browse the repository at this point in the history
kit: add reset-cache
  • Loading branch information
nick1udwig authored Mar 31, 2024
2 parents 1fbacac + f76776a commit 775dde3
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 32 deletions.
3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- [Terminal](./terminal.md)
- [Process Standard Library](./process_stdlib/overview.md)
- [Kit: Development Tool**kit**](./kit-dev-toolkit.md)
- [Install](./kit/install.md)
- [Installation](./kit/install.md)
- [`boot-fake-node`](./kit/boot-fake-node.md)
- [`new`](./kit/new.md)
- [`build`](./kit/build.md)
Expand All @@ -29,6 +29,7 @@
- [`dev-ui`](./kit/dev-ui.md)
- [`inject-message`](./kit/inject-message.md)
- [`run-tests`](./kit/run-tests.md)
- [`reset-cache`](./kit/reset-cache.md)
- [Tutorial: Build and Deploy an App](./build-and-deploy-an-app.md)
- [Environment Setup](./my_first_app/chapter_1.md)
- [Sending Some Messages, Using Some Tools](./my_first_app/chapter_2.md)
Expand Down
19 changes: 10 additions & 9 deletions src/kit-dev-toolkit.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# kit

`kit` is a tool**kit** that make development on Kinode OS ergonomic.
`kit` is a tool**kit** to make development on Kinode OS ergonomic.

## Table of Contents

* [Install](./install.md)
* [`kit boot-fake-node`](./boot-fake-node.md)
* [`kit new`](./new.md)
* [`kit build`](./build.md)
* [`kit start-package`](./start-package.md)
* [`kit dev-ui`](./dev-ui.md)
* [`kit inject-message`](./inject-message.md)
* [`kit run-tests`](./run-tests.md)
* [Installation](./kit/install.md)
* [`kit boot-fake-node`](./kit/boot-fake-node.md)
* [`kit new`](./kit/new.md)
* [`kit build`](./kit/build.md)
* [`kit start-package`](./kit/start-package.md)
* [`kit remove-package`](./kit/start-package.md)
* [`kit dev-ui`](./kit/dev-ui.md)
* [`kit inject-message`](./kit/inject-message.md)
* [`kit reset-cache`](./kit/reset-cache.md)
6 changes: 3 additions & 3 deletions src/kit/boot-fake-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`kit boot-fake-node` starts a "fake" (i.e. not connected to the live network) node, e.g.,

```bash
```
kit boot-fake-node
```

Expand All @@ -15,7 +15,7 @@ You can start a network of fake nodes that can communicate with each other (but
You'll need to start a new terminal for each fake node.
For example, to start two fake nodes, `fake.os` and `fake2.os`:

```bash
```
kit boot-fake-node
# In a new terminal
Expand Down Expand Up @@ -81,7 +81,7 @@ Options:

Pass to run a local binary or build a local Kinode core repo and use the resulting binary, e.g.

```bash
```
kit boot-fake-node --runtime-path ~/git/kinode
```

Expand Down
4 changes: 2 additions & 2 deletions src/kit/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

`kit build` builds the indicated package directory, or the current working directory if none supplied, e.g.,

```bash
```
kit build foo
```

or

```bash
```
kit build
```

Expand Down
4 changes: 2 additions & 2 deletions src/kit/dev-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

`kit dev-ui` starts a web development server with hot reloading for the indicated UI-enabled package (or the current working directory), e.g.,

```bash
```
kit dev-ui foo
```

or

```bash
```
kit dev-ui
```

Expand Down
2 changes: 1 addition & 1 deletion src/kit/inject-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`kit inject-message` injects the given message to the node running at given port/URL, e.g.,

```bash
```
kit inject-message foo:foo:template.os '{"Send": {"target": "fake2.os", "message": "hello world"}}'
```

Expand Down
11 changes: 6 additions & 5 deletions src/kit/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ You are encouraged to make use of the `--help` flag, which can be used for the t

```
$ kit --help
Development toolkit for Kinode OS
Development toolkit for Kinode
Usage: kit <COMMAND>
Commands:
boot-fake-node Boot a fake node for development [aliases: f]
build Build a Kinode package [aliases: b]
build-start-package Build and start a Kinode package [aliases: bs]
dev-ui Start the web UI development server with hot reloading (same as `cd ui && npm i && npm start`) [aliases: d]
dev-ui Start the web UI development server with hot reloading (same as `cd ui && npm i && npm run dev` [aliases: d]
inject-message Inject a message to a running Kinode [aliases: i]
new Create a Kinode template package [aliases: n]
run-tests Run Kinode tests [aliases: t]
remove-package Remove a running package from a node [aliases: r]
reset-cache Reset kit cache (Kinode core binaries, logs, etc.)
run-tests Run Kinode tests [aliases: t]
setup Fetch & setup kit dependencies
start-package Start a built Kinode process [aliases: s]
update Fetch the most recent version of kit
Expand All @@ -41,13 +42,13 @@ The first chapter of the [Build and Deploy an App tutorial](../my_first_app/chap

To get `kit`, run

```bash
```
cargo install --git https://github.com/kinode-dao/kit
```

To update, run that same command or

```bash
```
kit update
```

Expand Down
4 changes: 2 additions & 2 deletions src/kit/new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

`kit new` creates a Kinode package template at the specified path, e.g.,

```bash
```
kit new foo
```

creates the default template (a Rust chat app with no UI) in the `foo/` directory.

## Example Usage

```bash
```
# Create the default template: rust chat with no UI
kit new my_rust_chat
Expand Down
4 changes: 2 additions & 2 deletions src/kit/remove-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ If no arguments are provided, the same process happens for the current working d
Alternatively, a `--package` and `--publisher` can be provided as arguments, and that package will be removed.

For example,
```bash
```
kit remove-package foo
```

or

```bash
```
kit remove-package -package foo --publisher template.os
```

Expand Down
21 changes: 21 additions & 0 deletions src/kit/reset-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `kit reset-cache`

`kit reset-cache` resets the cache `kit` writes Kinode core binaries, logs, etc. to.

## Discussion

In general, `kit reset-cache` should not need to be used.
There are occasionally cases where the `kit` cache gets corrupted.
If seeing confusing and difficult to explain behavior from `kit`, a `kit reset-cache` won't hurt.

## Arguments

```
$ kit reset-cache --help
Reset kit cache (Kinode core binaries, logs, etc.)
Usage: kit reset-cache
Options:
-h, --help Print help
```
6 changes: 3 additions & 3 deletions src/kit/run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

`kit run-tests` runs the tests specified by the given `.toml` file, or `tests.toml`, e.g.,

```bash
```
kit run-tests my_tests.toml
```

or

```bash
```
kit run-tests
```

Expand All @@ -29,7 +29,7 @@ If a given test `Pass`es, the next test in the series is run.

## Arguments

```bash
```
$ kit t --help
Run Kinode tests
Expand Down
4 changes: 2 additions & 2 deletions src/kit/start-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

`kit start-package` installs and starts the indicated package directory (or current working directory) on the given Kinode, e.g.,

```bash
```
kit start-package foo
```

or

```bash
```
kit start-package
```

Expand Down

0 comments on commit 775dde3

Please sign in to comment.