summaryrefslogtreecommitdiff
path: root/readme.org
blob: 99e84f9d35e99dfa30f087e98fe7630e77c5dffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#+TITLE: Shackle Shell
#+AUTHOR: Justin Wernick

A shell for restricting access on a version control server.

This is intended as a replacement for [[https://git-scm.com/docs/git-shell][Git Shell]], but with a few opinionated
differences:

- Additional commands, like creating new repos, are built in. No extension with
  shell scripts.
- Strict enforcement of a specified directory structure. Git push / pull
  commands only work for these paths. New repos are created in these paths.
  - Private git repos are created in =~/git/<username>/<reponame>.git=
  - Shared git repos are created in =~/git/<groupname>/<reponame>.git=
- Better interactive UX than Git Shell, including:
  - Command history (limited to the current session).
  - Emacs-style shortcuts (eg =Ctrl+a= to move cursor to the beginning of line).
  - Docs available for all commands, available in the shell itself.
- (coming soon!) Support for other other version control systems.

* Getting Started

** Usage

# TODO

# When you login, you'll see the prompt >
# Type help to see the list of commands
# init my-awesome-repo will create the repo git/<username>/my-awesome-repo.git
# init --group my-group my-awesome-repo will create the repo
#   git/my-group/my-awesome-repo.git in shared mode.
# list to see all your repos

# From outside, git clone me@myserver:git/me/my-awesome-repo.git

** Installation

# TODO

# cargo install to build from source
# set as the user's shell

* Development Guide

# TODO

# cargo build
# cargo test --workspace
# cargo clippy

* Roadmap / Issue Tracker TODO list

** MVP

- [X] interactive command prompt
- [X] non-interactive commands can be run with -c
- [X] exit command
- [X] git init of private repo
- [X] responds to unknown commands
- [X] Isolation of workdir between tests
- [X] git fetch with git upload-pack
- [X] git push with git receive-pack
- [X] proper shell argument lexing, with quote stuff
- [X] history (only within same session)
- [X] don't quit interactive shell sessions if there's an error
- [X] help command
- [X] restrict repos to only acceptable paths
  - [X] clone / pull
  - [X] push
- [X] git init of shared repos
  - [X] create the shared repo in the right place
  - [X] use the right file permissions and config
  - [X] don't allow this to be a group the user isn't in
  - [X] allow pull and push from shared repos
- [X] listing of repos
- [X] set repo descriptions
  - [X] init new repo
  - [X] change an existing repo
- [X] Change ~git-init~ name to just be ~init~. Later, the ~git~ part will be an
  option which defaults to git.
- [X] set the main branch of a repo
- [X] help docs on all the commands

** Post-MVP

- [X] proper licensing
- [ ] all the getting started stuff in the readme
- [ ] publish to crates.io
- [ ] project website
- [ ] functions correctly when the git path isn't created yet
- [ ] git archive with git upload-archive
- [ ] git config management around protected branches
- [ ] move a repo to a different group
- [ ] housekeeping git tasks (git fsck, git gc)
- [ ] pijul fetch and pijul push
- [ ] pijul support on other commands

* License

Licensed under [[./LICENSE][MIT License]].