correct sections

This commit is contained in:
2026-02-14 15:13:18 -06:00
parent 8ec56e85fa
commit 86609c27f8
14 changed files with 89 additions and 274 deletions

View File

@@ -0,0 +1,5 @@
---
title: "C API"
description: "Extending ƿit with native C code"
type: "capi"
---

View File

@@ -1,175 +0,0 @@
---
title: "Command Line Interface"
description: "The pit tool"
type: "standalone"
---
ƿit provides a command-line interface for managing packages, running scripts, and building applications.
## Basic Usage
```bash
pit <command> [arguments]
```
## Commands
### pit version
Display the ƿit version.
```bash
pit version
# 0.1.0
```
### pit install
Install a package to the shop.
```bash
pit install gitea.pockle.world/john/prosperon
pit install /Users/john/local/mypackage # local path
```
### pit update
Update packages from remote sources.
```bash
pit update # update all packages
pit update <package> # update specific package
```
### pit remove
Remove a package from the shop.
```bash
pit remove gitea.pockle.world/john/oldpackage
```
### pit list
List installed packages.
```bash
pit list # list all installed packages
pit list <package> # list dependencies of a package
```
### pit ls
List modules and actors in a package.
```bash
pit ls # list files in current project
pit ls <package> # list files in specified package
```
### pit build
Build the current package.
```bash
pit build
```
### pit test
Run tests.
```bash
pit test # run tests in current package
pit test all # run all tests
pit test <package> # run tests in specific package
```
### pit link
Manage local package links for development.
```bash
pit link add <canonical> <local_path> # link a package
pit link list # show all links
pit link delete <canonical> # remove a link
pit link clear # remove all links
```
### pit fetch
Fetch package sources without extracting.
```bash
pit fetch <package>
```
### pit upgrade
Upgrade the ƿit installation itself.
```bash
pit upgrade
```
### pit clean
Clean build artifacts.
```bash
pit clean
```
### pit help
Display help information.
```bash
pit help
pit help <command>
```
## Running Scripts
Any `.ce` file in the ƿit core can be run as a command:
```bash
pit version # runs version.ce
pit build # runs build.ce
pit test # runs test.ce
```
## Package Locators
Packages are identified by locators:
- **Remote**: `gitea.pockle.world/user/repo`
- **Local**: `/absolute/path/to/package`
```bash
pit install gitea.pockle.world/john/prosperon
pit install /Users/john/work/mylib
```
## Configuration
ƿit stores its data in `~/.pit/`:
```
~/.pit/
├── packages/ # installed packages
├── lib/ # compiled dynamic libraries
├── build/ # build cache
├── cache/ # downloaded archives
├── lock.toml # installed package versions
└── link.toml # local development links
```
## Environment
ƿit reads the `HOME` environment variable to locate the shop directory.
## Exit Codes
- `0` — Success
- Non-zero — Error (check output for details)

View File

@@ -1,5 +1,5 @@
---
title: "Tools & Packages"
description: "Package management, shop architecture, and development tools"
title: "Packages"
description: "Package management, shop architecture, and the CLI"
type: "tools"
---

View File

@@ -0,0 +1,5 @@
sections:
- title: "Writing C Modules"
page: "/docs/c-modules/"
id: "c-modules"
group: "C API"

View File

@@ -7,10 +7,6 @@ sections:
url: "/docs/actors/"
- title: "Requestors"
url: "/docs/requestors/"
- title: "Packages"
url: "/docs/packages/"
- title: "Shop Architecture"
url: "/docs/shop/"
- title: "Reference"
pages:
- title: "Built-in Functions"
@@ -37,9 +33,15 @@ sections:
url: "/docs/library/json/"
- title: "random"
url: "/docs/library/random/"
- title: "Tools"
- title: "Packages"
pages:
- title: "Packages"
url: "/docs/packages/"
- title: "Shop Architecture"
url: "/docs/shop/"
- title: "CLI"
url: "/docs/cli/"
- title: "C API"
pages:
- title: "C Modules"
url: "/docs/c-modules/"

View File

@@ -11,10 +11,6 @@ sections:
page: "/docs/requestors/"
id: "requestors"
group: "Language"
- title: "Packages"
page: "/docs/packages/"
id: "packages"
group: "Language"
- title: "Built-in Functions"
page: "/docs/functions/"
id: "functions"
@@ -59,7 +55,3 @@ sections:
page: "/docs/library/random/"
id: "library-random"
group: "Standard Library"
- title: "Writing C Modules"
page: "/docs/c-modules/"
id: "c-modules"
group: "Tools"

View File

@@ -7,15 +7,11 @@ sections:
page: "/docs/shop/"
id: "shop"
group: "Packages"
- title: "Writing C Modules"
page: "/docs/c-modules/"
id: "c-modules"
group: "Development"
- title: "Command Line Interface"
page: "/docs/cli/"
id: "cli"
group: "CLI"
- title: "Testing"
page: "/docs/testing/"
id: "testing"
group: "Development"
- title: "Compiler Tools"
page: "/docs/compiler-tools/"
id: "compiler-tools"
group: "Development"
group: "CLI"

View File

@@ -21,17 +21,21 @@ theme = 'knr'
pageRef = '/manual/'
weight = 20
[[menus.main]]
name = 'Spec'
pageRef = '/spec/'
name = 'Packages'
pageRef = '/tools/'
weight = 30
[[menus.main]]
name = 'CLI'
pageRef = '/cli/'
name = 'C API'
pageRef = '/capi/'
weight = 40
[[menus.main]]
name = 'Spec'
pageRef = '/spec/'
weight = 50
[[menus.main]]
name = 'Contributing'
pageRef = '/contributing/'
weight = 50
weight = 60
[module]
[[module.mounts]]

View File

@@ -0,0 +1,19 @@
{{ define "main" }}
<div class="longform-layout">
<nav class="toc-nav" id="toc-nav">
<h3>Contents</h3>
<ul id="toc-list"></ul>
</nav>
<article class="longform-content" id="longform-content">
<h1>{{ .Title }}</h1>
{{ range .Site.Data.capi_sections.sections }}
<section id="{{ .id }}" data-toc-title="{{ .title }}" data-toc-group="{{ .group }}">
{{ with $.Site.GetPage .page }}
{{ .Content }}
{{ end }}
</section>
{{ end }}
</article>
</div>
<script src="/js/toc.js"></script>
{{ end }}