{"id":13541177,"url":"https://github.com/fdncred/nu_plugin_file","last_synced_at":"2025-09-12T03:06:47.909Z","repository":{"id":187469437,"uuid":"676625647","full_name":"fdncred/nu_plugin_file","owner":"fdncred","description":"A nushell plugin that will inspect a file and return information based on it's magic number.","archived":false,"fork":false,"pushed_at":"2025-03-29T18:55:20.000Z","size":84478,"stargazers_count":31,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T06:08:00.535Z","etag":null,"topics":["nushell","nushell-plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fdncred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-08-09T16:19:25.000Z","updated_at":"2025-03-29T18:55:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"8684b4bd-3e79-489b-9da9-e90fd0a8129b","html_url":"https://github.com/fdncred/nu_plugin_file","commit_stats":null,"previous_names":["fdncred/nu_plugin_file"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdncred","download_url":"https://codeload.github.com/fdncred/nu_plugin_file/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["nushell","nushell-plugin"],"created_at":"2024-08-01T10:00:40.447Z","updated_at":"2025-04-09T07:09:09.468Z","avatar_url":"https://github.com/fdncred.png","language":"Rust","readme":"# nu_plugin_file\n\nThis nushell plugin will open files to inspect them and report back a little information. It uses magic bytes to determine many file formats. The core code was \"borrowed\" from a [spacedrive](https://github.com/spacedriveapp/spacedrive/tree/main/crates/file-ext) crate that I thought looked interesting.\n\n## Usage:\n\n```nushell\n❯ help file\nView file format information\n\nUsage:\n  \u003e file \u003cfilename\u003e\n\nFlags:\n  -h, --help - Display the help message for this command\n\nParameters:\n  filename \u003cstring\u003e: full path to file name to inspect\n\nExamples:\n  Get format information from file\n  \u003e file some.jpg\n  ╭──────────────┬──────────╮\n  │ description  │ Image    │\n  │ format       │ jpg      │\n  │ magic_offset │ 0        │\n  │ magic_length │ 2        │\n  │ magic_bytes  │ [FF, D8] │\n  ╰──────────────┴──────────╯\n```\n## Example with MacOS executable\n```nushell\n❯ file ~/.cargo/bin/nu | table -e \n╭─────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ description │ mach-o binary, arm64                                                                                     │\n│ format      │ Executable                                                                                               │\n│             │ ╭─#─┬─offset─┬─length─┬────────bytes─────────╮                                                           │\n│ magics      │ │ 0 │      0 │      4 │ [207, 250, 237, 254] │                                                           │\n│             │ ╰───┴────────┴────────┴──────────────────────╯                                                           │\n│             │ ╭──────────────┬───────────────────────────────────────────────────────────────────────────────────────╮ │\n│ details     │ │ arch         │ arm64                                                                                 │ │\n│             │ │ format       │ mach-o                                                                                │ │\n│             │ │              │ ╭───┬───────────────────────────────────────────────────────────────────────────────╮ │ │\n│             │ │ dependencies │ │ 0 │ /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation         │ │ │\n│             │ │              │ │ 1 │ /usr/lib/libobjc.A.dylib                                                      │ │ │\n│             │ │              │ │ 2 │ /System/Library/Frameworks/Security.framework/Versions/A/Security             │ │ │\n│             │ │              │ │ 3 │ /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation │ │ │\n│             │ │              │ │ 4 │ /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices     │ │ │\n│             │ │              │ │ 5 │ /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit                   │ │ │\n│             │ │              │ │ 6 │ /usr/lib/libiconv.2.dylib                                                     │ │ │\n│             │ │              │ │ 7 │ /usr/lib/libSystem.B.dylib                                                    │ │ │\n│             │ │              │ ╰───┴───────────────────────────────────────────────────────────────────────────────╯ │ │\n│             │ ╰──────────────┴───────────────────────────────────────────────────────────────────────────────────────╯ │\n╰─────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n## Installation\n1. clone repo `git clone https://github.com/fdncred/nu_plugin_file.git`\n2. install with cargo `cargo install --path .`\n3. register plugin with nushell `plugin add /path/to/nu_plugin_file`\n4. bring plugin into scope `plugin use /path/to/nu_plugin_file`\n5. inspect a file `file some.jpg`\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdncred%2Fnu_plugin_file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdncred%2Fnu_plugin_file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdncred%2Fnu_plugin_file/lists"}