Commit ad0f961
Add cli for @huggingface/hub (#1412)
cc @Wauplin @hanouticelina for viz
Internal context:
https://huggingface.slack.com/archives/C0256NXF0A2/p1745930278721439?thread_ts=1741697907.530409&cid=C0256NXF0A2
Also add `createBranch` and `deleteBranch` functions
Follow up to #1398
eg:
```console
npm install -g @huggingface/hub
export HF_TOKEN=...
# Upload current dir to coyotte508/test-model in a new empty "build" branch
hfjs create-branch coyotte508/test-model build --empty
hfjs upload coyotte508/test-model --revision build
```
## Testing
go into `packages/hub`
run `pnpm install`
and run `sudo npm link` - then you can use `hfjs`
or just do `node dist/cli.js upload ...`
---------
Co-authored-by: Julien Chaumond <[email protected]>1 parent 3a3868f commit ad0f961
File tree
17 files changed
+1079
-66
lines changed- packages
- doc-internal
- hub
- src
- lib
- utils
- inference/src/lib
17 files changed
+1079
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
96 | 125 | | |
97 | 126 | | |
98 | 127 | | |
| |||
0 commit comments