@softpractice/softpractice-cli 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +114 -27
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -1,41 +1,128 @@
1
- # Softpractice CLI npm installer
1
+ <p align="center">
2
+ <a href="https://softpractice.ru">
3
+ <img src="https://raw.githubusercontent.com/arthur-s/softpractice-cli/main/docs/assets/softpractice-logo-horizontal-navy.png" alt="SoftPractice" width="360">
4
+ </a>
5
+ </p>
2
6
 
3
- This package is a launcher for the native Softpractice CLI. During installation
4
- it downloads the GoReleaser archive with the same version from the GitHub
5
- Release, verifies it against `checksums.txt`, and installs the `softpractice`
6
- command.
7
+ # SoftPractice CLI
8
+
9
+ The command-line companion for [SoftPractice](https://softpractice.ru) — an
10
+ online platform for project-based programming practice with an AI mentor.
11
+
12
+ SoftPractice lets you work on realistic programming tasks in local Git
13
+ projects, submit committed solutions for review, receive feedback, and continue
14
+ through a practicum lesson by lesson. The CLI connects your local development
15
+ workflow to your SoftPractice workspace.
16
+
17
+ > SoftPractice — онлайн-тренажёр по программированию с AI-наставником,
18
+ > построенный вокруг практической работы над проектами. CLI позволяет получать
19
+ > задания, отправлять решения и переходить между уроками прямо из терминала.
20
+
21
+ ## Install
7
22
 
8
23
  ```bash
9
24
  npm install -g @softpractice/softpractice-cli
25
+ ```
26
+
27
+ Verify the installation:
28
+
29
+ ```bash
10
30
  softpractice --help
11
31
  ```
12
32
 
13
- The installer supports macOS, Linux, and Windows on `arm64` and `x64`. It
14
- requires Node.js 18 or newer and access to GitHub Releases. Installation with
15
- `--ignore-scripts` is unsupported because npm would not download the native
16
- binary.
33
+ ## Getting started
34
+
35
+ Sign in to SoftPractice:
36
+
37
+ ```bash
38
+ softpractice login
39
+ ```
40
+
41
+ Download the starter project for your current practicum:
42
+
43
+ ```bash
44
+ softpractice starter
45
+ ```
46
+
47
+ Open the created directory and check the current lesson:
48
+
49
+ ```bash
50
+ cd <project-directory>
51
+ softpractice status
52
+ ```
53
+
54
+ Work on the project and commit your changes with Git. When the solution is
55
+ ready, submit the current commit:
56
+
57
+ ```bash
58
+ softpractice submit
59
+ ```
60
+
61
+ Check the submission and open its result:
62
+
63
+ ```bash
64
+ softpractice submission show
65
+ softpractice open
66
+ ```
67
+
68
+ After an accepted solution, apply the transition to the next available lesson:
69
+
70
+ ```bash
71
+ softpractice update
72
+ ```
73
+
74
+ ## Common commands
75
+
76
+ | Command | Description |
77
+ | --- | --- |
78
+ | `softpractice login` | Sign in through the browser |
79
+ | `softpractice starter` | Download the first lesson project |
80
+ | `softpractice status` | Show the current lesson and local project state |
81
+ | `softpractice submit` | Submit the current committed Git revision |
82
+ | `softpractice submission show` | Show the latest submission and review result |
83
+ | `softpractice update` | Apply the transition to the next lesson |
84
+ | `softpractice open` | Open the workspace or latest result in the browser |
85
+ | `softpractice project restore` | Restore a project from the latest usable revision |
86
+
87
+ Run `softpractice help <command>` for detailed help.
88
+
89
+ ## Language
90
+
91
+ SoftPractice CLI supports English and Russian and selects a language from the
92
+ system locale when possible.
93
+
94
+ Choose a language explicitly:
95
+
96
+ ```bash
97
+ softpractice set lang en
98
+ softpractice set lang ru
99
+ ```
100
+
101
+ You can also override it for a single command:
17
102
 
18
- ## Manual release
103
+ ```bash
104
+ softpractice --lang ru status
105
+ ```
106
+
107
+ ## Project recovery
19
108
 
20
- The npm version must equal the GitHub release version without its `v` prefix.
21
- For example, npm `0.1.0` installs artifacts from GitHub Release `v0.1.0`.
109
+ If the original project directory is unavailable, restore the latest usable
110
+ revision into a new directory:
111
+
112
+ ```bash
113
+ softpractice project restore \
114
+ --practicum <practicum-id> \
115
+ --directory ./restored-project
116
+ ```
22
117
 
23
- 1. Update the `version` in this directory's `package.json`.
24
- 2. Commit it and create the matching Git tag, for example `v0.1.0`.
25
- 3. Run `goreleaser release --clean` from the repository root and confirm that
26
- the GitHub Release contains all platform archives and `checksums.txt`.
27
- 4. From this directory, run `npm install`, `npm test`, and `npm pack --dry-run`.
28
- 5. Authenticate once with `npm login`, then publish with:
118
+ The CLI never overwrites an existing project directory.
29
119
 
30
- ```bash
31
- npm publish --access public
32
- ```
120
+ ## Links
33
121
 
34
- 6. In an empty temporary directory, verify the published package:
122
+ - [SoftPractice](https://softpractice.ru)
123
+ - [Source code](https://github.com/arthur-s/softpractice-cli)
124
+ - [Issues](https://github.com/arthur-s/softpractice-cli/issues)
35
125
 
36
- ```bash
37
- npm install -g @softpractice/softpractice-cli@0.1.0
38
- softpractice --help
39
- ```
126
+ ## License
40
127
 
41
- Do not publish the npm package before its matching GitHub Release exists.
128
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softpractice/softpractice-cli",
3
- "version": "0.1.1",
4
- "description": "Cross-platform command-line companion for a Softpractice learning workspace",
3
+ "version": "0.1.2",
4
+ "description": "CLI for SoftPractice, an online platform for project-based programming practice",
5
5
  "license": "MIT",
6
6
  "author": "Arthur Sultanbekov",
7
7
  "repository": {
@@ -11,12 +11,14 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/arthur-s/softpractice-cli/issues"
13
13
  },
14
- "homepage": "https://github.com/arthur-s/softpractice-cli#readme",
14
+ "homepage": "https://softpractice.ru",
15
15
  "bin": {
16
16
  "softpractice": "bin/softpractice.js"
17
17
  },
18
18
  "scripts": {
19
+ "prepack": "node tools/sync-readme.js",
19
20
  "postinstall": "node scripts/install.js",
21
+ "sync:readme": "node tools/sync-readme.js",
20
22
  "test": "node --test test/**/*.test.js",
21
23
  "pack:dry-run": "npm pack --dry-run"
22
24
  },