Use the existing CLI; do not implement browser uploads yourself. Use the project's Patchright Chrome and a standalone Instagram session, not the Business Suite binding entry point. The browser is visible by default; when no proxy is configured, connect directly via the system network; when a proxy is needed, explicitly use --proxy or set SAU_INSTAGRAM_PROXY. Pass --proxy "" to ignore environment variables and connect directly.
sau instagram login --account creator
sau instagram check --account creator
sau instagram upload-video --account creator --file videos/demo.mp4 --thumbnail covers/demo.png --title "标题" --desc "正文" --tags 生活,分享 --result .local/instagram-video.json
sau instagram upload-note --account creator --images images/1.jpg images/2.jpg --title "轮播标题" --note "正文" --result .local/instagram-images.json
For videos/Reels, you can use --thumbnail to specify a JPG/JPEG/PNG cover; if omitted, Instagram's default cover is used. After specifying an image, it checks that the main preview actually uses that image, and stops submission if it fails. The cover is center-cropped to the current video aspect ratio; important text near the image edges should be kept within a safe area. This parameter is not accepted for image posts.
The account file is saved as cookies/instagram_creator.json. Passwords and verification are entered by the user in the project browser. The upload flow automatically skips the first-time notification prompt and confirms the Reels introduction; if there is no prompt, it continues. Login verification is still completed by the user; unknown pop-ups or failed prompt dismissals must be reported, and success must not be claimed.
Videos support MP4/MOV; photos support JPG/JPEG/PNG/AVIF/HEIC/HEIF, with actual handling depending on the platform. Multiple images are published as a carousel in input order; single image and two-image carousels have been tested. Title, body, and hashtags combined are limited to 2200 characters. The photo/Reels form and advanced settings for the current account's standalone web version have no scheduling entry point, and the current CLI only supports immediate publishing; scheduled tasks cannot be converted to immediate publishing. Location, collaborators, AI labels, alt text, filters, cropping, sound, and comment/like settings are not integrated and use the page defaults.
Final result published means the platform confirmed the work was created, returning the work ID, original work link, and media count.processing means it has been accepted and is still processing;submission_unknown means the result after submission is unconfirmed; it must not be treated as published, and must not be re-sent directly. By default the result is located at .local/instagram-results/; use --result to fix the record path.
sau instagram verify --account creator --post-url "原作品链接" --expected-text "原作品中的准确文字" --result .local/instagram-verify.json
sau instagram delete --account creator --post-url "原作品链接" --expected-text "原作品中的准确文字" --result .local/instagram-delete.json
If the result is unknown but there is no link, first look for the original work on the same account's profile by media, caption, and publish time, copy the link, and then run verify; not finding it does not prove failure, and do not re-upload. Links support /p/编号/、/reel/编号/ and the form with the author name. Deletion is only allowed after verifying the logged-in user, author, work ID, and body text. Deletion returns deleted, and the work goes to "Recently Deleted"; batch deletion and early permanent emptying are out of scope. Local media will not be deleted.deletion_unknown must first query the original work and "Recently Deleted", and must not submit a duplicate deletion.
For full parameters and capability boundaries, refer to sau instagram upload-video --help、upload-note --help、verify --help and delete --help . On failure, analyze based on the errors in the result file and local evidence; account status, screenshots, or page records must not be committed to Git.
Example Scripts
scripts/examples/ The files under this directory are examples for copying, not runtime dependencies. Before executing, first check the current CLI's --help, and replace the account, media, and body text; these commands may create real works.
instagram_commands.ps1:PowerShellinstagram_commands.sh:Bashinstagram_cli_template.py:Python subprocess