{"id":21455967,"url":"https://github.com/sntran/fshared","last_synced_at":"2026-05-18T01:38:52.526Z","repository":{"id":62422807,"uuid":"538308488","full_name":"sntran/fshared","owner":"sntran","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-23T03:37:58.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-15T02:49:12.699Z","etag":null,"topics":["cli","deno","fshare","fshare-api","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sntran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-19T02:43:42.000Z","updated_at":"2023-07-08T03:05:46.000Z","dependencies_parsed_at":"2022-11-01T17:32:05.668Z","dependency_job_id":null,"html_url":"https://github.com/sntran/fshared","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sntran/fshared","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntran%2Ffshared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntran%2Ffshared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntran%2Ffshared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntran%2Ffshared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sntran","download_url":"https://codeload.github.com/sntran/fshared/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntran%2Ffshared/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","deno","fshare","fshare-api","hacktoberfest"],"created_at":"2024-11-23T05:14:07.817Z","updated_at":"2026-05-18T01:38:52.510Z","avatar_url":"https://github.com/sntran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FShare Client\n\nA simple client to interact with Fshare.VN through their API.\n\n## Installation\n\nUntil static binaries are released, Deno must be installed. Instructions can be\nfound at https://deno.land/manual/getting_started/installation\n\nInstall this module as a standalone command named `fshare`, allowing all\npermissions. Tweak the permission flags as needed. See\nhttps://deno.land/manual/getting_started/permissions\n\n```shell\ndeno install --unstable --allow-all -n fshare https://deno.land/x/fshare/main.ts\n```\n\n## Command-Line Usage\n\nAll commands requires `--username` and `--password` flags to authenticate with\nFShare. Environment variables `FSHARE_USER_EMAIL` and `FSHARE_PASSWORD` can also\nbe used to avoid the credentials being in the shell's history.\n\n### Download\n\nDownload command renders a progress bar by default, and can be turned off with\n`--no-progress` flag.\n\nDownloads a file to the current directory, using the file name on Fshare.\n\n```shell\nfshare download -LO https://www.fshare.vn/file/XXXXXXXXXX\n```\n\nDownloads a file using its ID to the current directory.\n\n```shell\nfshare download -LO XXXXXXXXXX\n```\n\nDownloads a file to the current directory, with custom file name:\n\n```shell\nfshare download -L XXXXXXXXXX --output my.file\n```\n\nDownloads a file and redirects it to a file:\n\n```shell\nfshare download -L XXXXXXXXXX \u003e my.file\n```\n\nDownloads a file and streams it to `rclone`\n\n```shell\nfshare download -L XXXXXXXXXX | rclone rcat remote:path/to/file\n```\n\n### Upload\n\nUpload command renders a progress bar by default, and can be turned off with\n`--no-progress` flag.\n\nUploads a file with relative path to a folder in FShare:\n\n```shell\nfshare upload -L ./local.file /remote-folder\n```\n\nUploads a file with absolute path to a folder in FShare:\n\n```shell\nfshare upload -L /home/user/Downloads/local.file /remote-folder\n```\n\nUploads a file from `stdin`, passing the `size` flag:\n\n```shell\ncat ./local.file | fshare upload -L - /remote-folder\n# OR from `rclone cat`\nrclone cat remote:path/to/file | fshare upload -L - /remote-folder\n```\n\n### Other Operations\n\nGet user's file/folder list\n\n```shell\nfshare list --pageIndex=0 dirOnly=0 --limit=100 --path=\"\" --ext=\"\"\n```\n\nCreates a folder under a parent folder. The parent can be `0` for root, or\n`linkcode` of another folder.\n\n```shell\nfshare createFolder name parentLinkcode\n```\n\nRenames a file or folder using its `linkcode`.\n\n```shell\nfshare rename linkcode, newName\n```\n\nMoves file(s) or folder(s) using their `linkcode` to a new root.\n\n```shell\nfshare move linkcode, parentLinkcode\n```\n\nDeletes file(s) or folder(s) using their `linkcode`.\n\n```shell\nfshare delete linkcode\n```\n\nSets password for file(s) using their `linkcode`.\n\n```shell\nfshare createFilePass linkcode password\n```\n\nToggles files(s) secure storage using their `linkcode`. Setting `status` 1 to\nput the items in secure storage, 0 to remove them.\n\n```shell\nfshare changeSecure linkcode 1\n```\n\nDuplicates file using its `linkcode` to a `linkcode` of another folder.\n\n```shell\nfshare duplicate linkcode, parentLinkCode\n```\n\n## Deno Usage\n\n```ts\nimport { Client } from \"https://deno.land/x/fshare/mod.ts\";\n\nconst client = await Client.connect(\"user@example.com\", \"passwod\");\n\n// Uploads a file to FShare from `stdin`.\nlet response = await client.upload(\"/folder/file.txt\", {\n  headers: {\n    \"Content-Length\": \"123\",\n  },\n  body: Deno.stdin.readable,\n});\n// Retrieves the uploaded file's URL in the response.\nconst { url } = await response.json();\n\n// Downloads from the file URL.\nresponse = await client.download(url);\n// Sends file content to `stdout`.\nawait response.body!.pipeTo(Deno.stdout.writable);\n```\n\n## API Reference\n\n```ts\nlogin(): Promise\u003cResponse\u003e;\nlogout(): Promise\u003cResponse\u003e;\nuser(): Promise\u003cResponse\u003e;\nupload(url: string | URL, init?: RequestInit): Promise\u003cResponse\u003e;\ndownload(url: string | URL, init?: RequestInit): Promise\u003cResponse\u003e;\nlist(params: Partial\u003cListParams\u003e): Promise\u003cResponse\u003e;\ncreateFolder(name: string, parent: linkcode): Promise\u003cResponse\u003e;\nrename(item: linkcode, to: string): Promise\u003cResponse\u003e;\nmove(item: linkcode, to: linkcode): Promise\u003cResponse\u003e;\nmove(items: linkcode[], to: linkcode): Promise\u003cResponse\u003e;\nmove(items: linkcode | linkcode[], to: linkcode): Promise\u003cResponse\u003e;\ndelete(item: linkcode): Promise\u003cResponse\u003e;\ndelete(items: linkcode[]): Promise\u003cResponse\u003e;\ndelete(items: linkcode | linkcode[]): Promise\u003cResponse\u003e;\ncreateFilePass(item: linkcode, password: string): Promise\u003cResponse\u003e;\ncreateFilePass(items: linkcode[], password: string): Promise\u003cResponse\u003e;\ncreateFilePass(\n  items: linkcode | linkcode[],\n  password: string,\n): Promise\u003cResponse\u003e;\nchangeSecure(item: linkcode, status: toggle): Promise\u003cResponse\u003e;\nchangeSecure(items: linkcode[], status: toggle): Promise\u003cResponse\u003e;\nchangeSecure(items: linkcode | linkcode[], status: toggle): Promise\u003cResponse\u003e;\nduplicate(item: linkcode, to: linkcode): Promise\u003cResponse\u003e;\n```\n\n## Examples\n\nMore examples can be found in [examples](./examples) folder.\n\n## Roadmap\n\n- [ ] Upload multiple files\n- [ ] Download multiple linkcodes\n- [ ] Download multiple files from a folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsntran%2Ffshared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsntran%2Ffshared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsntran%2Ffshared/lists"}