{"id":19577911,"url":"https://github.com/mihaigalos/aim","last_synced_at":"2025-05-16T07:06:57.310Z","repository":{"id":36971503,"uuid":"422923364","full_name":"mihaigalos/aim","owner":"mihaigalos","description":"🎯 A command line download/upload tool with resume.","archived":false,"fork":false,"pushed_at":"2025-05-06T12:11:42.000Z","size":2632,"stargazers_count":135,"open_issues_count":15,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-09T12:42:24.316Z","etag":null,"topics":["command-line","command-line-tool","commandline-tool","curl","download-resume","downloader","resume","rust","wget"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mihaigalos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-30T15:47:14.000Z","updated_at":"2025-05-06T12:11:45.000Z","dependencies_parsed_at":"2023-10-23T09:31:17.202Z","dependency_job_id":"6f35a130-6f7e-42f1-8e99-b97577aadaa8","html_url":"https://github.com/mihaigalos/aim","commit_stats":{"total_commits":894,"total_committers":4,"mean_commits":223.5,"dds":"0.20917225950783003","last_synced_commit":"9bcf5344a8160b98cef6c137ed2d660731291392"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaigalos%2Faim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaigalos%2Faim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaigalos%2Faim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaigalos%2Faim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihaigalos","download_url":"https://codeload.github.com/mihaigalos/aim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485064,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["command-line","command-line-tool","commandline-tool","curl","download-resume","downloader","resume","rust","wget"],"created_at":"2024-11-11T07:08:48.838Z","updated_at":"2025-05-16T07:06:52.300Z","avatar_url":"https://github.com/mihaigalos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aim\n[![CI](https://github.com/mihaigalos/aim/actions/workflows/ci.yaml/badge.svg)](https://github.com/mihaigalos/aim/actions/workflows/ci.yaml)\n[![CD](https://github.com/mihaigalos/aim/actions/workflows/cd.yaml/badge.svg)](https://github.com/mihaigalos/aim/actions/workflows/cd.yaml)\n[![Security Audit](https://github.com/mihaigalos/aim/actions/workflows/audit.yaml/badge.svg)](https://github.com/mihaigalos/aim/actions/workflows/audit.yaml)\n[![codecov](https://codecov.io/gh/mihaigalos/aim/branch/main/graph/badge.svg?token=CYCF96JIOH)](https://codecov.io/gh/mihaigalos/aim)\n[![crates.io](https://img.shields.io/crates/d/aim.svg)](https://crates.io/crates/aim)\n![](https://img.shields.io/docker/image-size/mihaigalos/aim/latest?logo=Docker)\n\nA command line download/upload tool with resume.\n\n![resume example](screenshots/aim.gif)\n\n## Table of Contents\n\u003c!--\nGenerated with:\ndocker run -v $PWD:/app -w /app --rm -it pbzweihander/markdown-toc README.md --bullet \"*\" --indent 2 --min-depth 1\n--\u003e\n\u003ctable\u003e\n    \u003ctr\u003e\u003ctd width=33% valign=top\u003e\n\n* [❓ Motivation](#-motivation)\n* [💿︎ Installation](#%EF%B8%8E-installation)\n* [💡 Features](#-features)\n  * [Feature matrix](#feature-matrix)\n  * [Download / Upload](#download--upload)\n  * [Optional check of sha256](#optional-check-of-sha256)\n  * [Interactive mode](#interactive-mode)\n  * [Resume](#resume)\n  * [Output during downloading](#output-during-downloading)\n  * [Sharing a folder](#sharing-a-folder)\n  * [Indicators](#indicators)\n  * [Output](#output)\n\n\u003c/td\u003e\u003ctd width=33% valign=top\u003e\n\n* [🔑 Authentication](#-authentication)\n  * [Basicauth in url](#basicauth-in-url)\n  * [Netrc](#netrc)\n  * [SSH keys](#ssh-keys)\n  * [.aws folder](#aws-folder)\n* [🆕 Updating](#-updating)\n\n\u003c/td\u003e\u003ctd width=33% valign=top\u003e\n\n* [🐳 Docker](#-docker)\n  * [Hosting on machine A](#hosting-on-machine-a)\n  * [Downloading on machine B](#downloading-on-machine-b)\n* [🛠️ Similar work](#%EF%B8%8F-similar-work)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## ❓ Motivation\nSimplicity: download or upload files depending on parameter order with default settings.\n\n## 💿︎ Installation\n\nDownload a release for Linux or MacOS from [releases](https://github.com/mihaigalos/aim/releases). See the [Docker](https://github.com/mihaigalos/aim#docker) section on how to run it platform-independently.\n\nIf you want to build from source, use:\n```bash\ncargo install aim\n```\n\n## 💡 Features\n\n### Feature matrix\n\n Protocol | Download | Upload | Resume | Interactive mode |\n----------|----------|--------|--------|------------------|\n  http(s) |    ✅    |   ✅   |   ✅   |       ✅         |\n  ftp     |    ✅    |   ✅   |   ✅   |       ❌         |\n  sftp    |    ✅    |   ✅   |   ✅   |       ❌         |\n  ssh     |    ✅    |   ✅   |   ❌   |       ❌         |\n  s3      |    ✅    |   ✅   |   ❌   |       ❌         |\n\n### Download / Upload\n* default action implied from parameter order.\n  * `aim https://domain.com/` -\u003e Display contents.\n  * `aim https://domain.com/source.file .` -\u003e Download.\n  * `aim source.file https://domain.com/destination.file` -\u003e Upload.\n* support for `http(s)`, `(s)ftp`, `ssh`, `s3` (no resume at the moment).\n\n### Optional check of sha256\nTo validate that a download matches a desired checksum, just list it at the end when invoking `aim`.\n```rust\naim https://github.com/XAMPPRocky/tokei/releases/download/v12.0.4/tokei-x86_64-unknown-linux-gnu.tar.gz . 0e0f0d7139c8c7e3ff20cb243e94bc5993517d88e8be8d59129730607d5c631b\n```\n\n### Resume\n\nPlease consult the [Feature matrix](#feature-matrix) to find out if transfers via your desired protocol are resumable.\n\nResumable transfers pick up from a specific byte offset and continue. Extensive testing ensures that transfers are byte-exact (hash comparison between expected and actual transfer artefacts).\n\n\u003e Node: If you're hosting a http(s) server yourself, upload needs `PUT` ranges (or a [patched](https://github.com/arut/nginx-patches) version of `nginx`).\n\n### Interactive mode\n\n![resume example](screenshots/aim_interactive.gif)\nThis feature can be activated by passing the `-i` or `--interactive` flag to the invocation.\n\nIt allows you to specify an initial URL and then navigate through links found in it using fuzzy search.\n\nControls:\n* Start typing, partial matches are listed.\n* `Tab` expands the path and goes into it, lists contents.\n* `/` goes into path without expanding, lists contents.\n* `..` goes one level up.\n* `Enter` finalizes the interaction and takes the result, performs the required operation on it.\n\nThis feature can be used in conjunction with [`Output during downloading`](#output-during-downloading) and/or [`Sharing a folder`](#sharing-a-folder).\n\n### Output during downloading\n\nSeveral output formats can be specified:\n* `aim source .` - downloads to the same basename as the source.\n* `aim source +` - downloads to the same basename as the source and attempts to decompress. Target extensions are read and the system decompressor is called. Further info [here](https://github.com/moisutsu/melt).\n* `aim source destination` - download to a new or existing file called `destination`.\n\n----------------------------------------\n\n### Sharing a folder\n`aim` can serve a folder over `http` on one device so that you can download it on another. By default, the serving port is `8080` or the next free port.\n\nYou can optionally set the `AIM_HOSTING_PORT` environment variable in your shell or `.env` file for a specific port.\n\n`Machine A`\n```bash\naim . # to serve current folder\n```\n\n`Machine B`\n```bash\naim http://ip_of_Machine_A:8080 # list contents\naim http://ip_of_Machine_A:8080/file . # download\n```\n\nMoreover, since hosting is done over http, the client can even be a browser:\n![hosting example](screenshots/self_hosting.png)\n\nThe server prints logs to the standard output. To colorize them, you can use [pipeview](https://github.com/mihaigalos/pipeview):\n\n\n```bash\naim . | pipeview --aim\n```\n![hosting example logs](screenshots/self_hosting_logs.png)\n\n\n### Indicators\nBy default, a progressbar is displayed when up/downloading. The indicators can be configured via the internally used [`indicatif`](https://crates.io/crates/indicatif) package.\n\nYou can change the display template and progress chars by either setting correct environment variables or creating a `.env` file in the folder you are calling from:\n```bash\nAIM_PROGRESSBAR_DOWNLOADED_MESSAGE=\"🎯 Downloaded {input} to {output}\"\nAIM_PROGRESSBAR_MESSAGE_FORMAT=\"🎯 Transferring {url}\"\nAIM_PROGRESSBAR_PROGRESS_CHARS=\"=\u003e-\"\nAIM_PROGRESSBAR_TEMPLATE=\"{msg}\\n{spinner:.cyan}  {elapsed_precise} ▕{bar:.white}▏ {bytes}/{total_bytes}  {bytes_per_sec}  ETA {eta}.\"\nAIM_PROGRESSBAR_UPLOADED_MESSAGE=\"🎯 Uploaded {input} to {output}\"\nAIM_HOSTING_PORT=8080\n```\n\nBy default, no progressbar is displayed if content length \u003c1MB (easy display contents of remote).\n\n----------------------------------------\n\n### Output\n\nBecause default output is stdout, `aim` is pipe-able to other commands:\n```bash\naim https://github.com/XAMPPRocky/tokei/releases/download/v12.0.4/tokei-x86_64-unknown-linux-gnu.tar.gz | tar xvz\naim https://www.rust-lang.org/ | htmlq --attribute href a\n```\n\n----------------------------------------\n\n## 🔑 Authentication\n\n### Basicauth in url\n\nJust use the syntax `protocol://user:pass@server:port`. This can be used for all `http(s)`, `ftp`, `ssh` and `s3`.\n\nExample for downloading:\n\n```bash\naim ftp://user:pass@127.0.0.1:21/myfile .\n```\n\n### Netrc\n\nCreate a file named `.netrc` with read permissions in `~` or the current folder you're running `aim` from to automate login to that endpoint:\n```bash\nmachine mydomain.com login myuser password mypass port server_port\n```\n\n### SSH keys\n\nKeys that match the following patterns are automatically tried:\n* id_ed25519\n* id_rsa\n* keys/id_ed25519\n* keys/id_rsa\n* ~/.ssh/id_rsa\n* ~/.ssh/keys/id_ed25519\n\n### .aws folder\n\nCredentials for AWS interaction (i.e.: S3) are automatically read from `~/.aws/credentials`.\n\nAlternatively, the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are read.\n\n----------------------------------------\n\n## 🆕 Updating\n\n`aim` can self update in-place using:\n\n```bash\naim --update\n```\n\n## 🐳 Docker\n\nFor convenience, alpine-based docker images for `aarch64` and `x64` are available, so arguments can be passed directly to them.\n\n```bash\ndocker run --rm -it -v $(pwd):/src --net=host --user $UID:$UID mihaigalos/aim https://raw.githubusercontent.com/mihaigalos/aim/main/LICENCE.md\n```\n\n### Hosting on machine A\n```bash\ncd $(mktemp -d)\necho hello \u003e myfile\ndocker run --rm -it -v $(pwd):/src --user $UID:$UID -p 8080:8080 mihaigalos/aim /src\n```\n### Downloading on machine B\n\nAdapt IP to match that of machine `A`.\n\n```bash\ndocker run --rm -it -v $(pwd):/src --user $UID:$UID mihaigalos/aim http://192.168.0.24:8080/myfile /src/myfile\n```\n----------------------------------------\n\n## 🛠️ Similar work\n[`duma`](https://github.com/mattgathu/duma), [`grapple`](https://github.com/daveallie/grapple), [`rget`](https://github.com/Arcterus/rget).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaigalos%2Faim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihaigalos%2Faim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaigalos%2Faim/lists"}